//  3位数的颜色代码扩展为 6 位数的颜色
export const extendHex = shortHex =>
    '#' +
    shortHex
        .slice(shortHex.startsWith('#') ? 1 : 0)
        .split('')
        .map(x => x + x)
        .join('')

// 多重数组查重
export const multiarrayCheck = (colors, value) => {
    for (let i = 0; i < colors.length; i++) {
        const el = colors[i]
        for (let i2 = 0; i2 < el.length; i2++) {
            const el2 = el[i2]
            if (el2.color == value) {
                return el2
            }
        }
    }
    return false
}
